<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace yiike\user\controllers;

use Yii;

/**
 * 
 * @author Sylar
 */
class GetController extends \api\components\UserController {
    
    /**
     * 获取个人资料
     * @return boolean
     */
    public function actionProfile() {
        $profile = \yiike\user\models\Profile::findOne($this->user->id);
        $profile->avatar = $profile->avatarUrl;
        return ['code' => 0, 'data' => $profile->attributes];
    }
}
